Skip to main content

Documet details

The Invoice API provides key functionalities:

  • Get the status from the government for the e-invoice

Endpoint

  • Base URL: malaysia-sandbox.complyance.io
  • Documet details API: /getDocumentDetailsFromLHDN

Headers

HeaderTypeDescriptionExample
x-api-keystringAPI Key for authentication1aN3AQ8ZsggJ0UABAHXVB
invoiceMethodstringThe method of invoicing (e.g., non-peppol)non-peppol
Content-TypestringDefines that the body is in JSON formatapplication/json

curl --location 'https://malaysia-sandbox.complyance.io/getDocumentDetailsFromLHDN' 
--header 'x-api-key: k4PW_J0s8DtBSdvYnadXn' \
--header 'Content-Type: application/json'

Request Body

The request body for the Document detail should be structured as follows:

{
"documentUuid": "ZG9KWZ1Q2BPSG9XWMN4485AJ10"
}

Request Body Fields

FieldTypeDescriptionExample
documentUUIDstringUnique identifier received from government as an acknowledgement

Sample Response Body

Success Response (HTTP 200 OK)

{

"uuid": "CR10K32STZXCE46MFXS62EEJ10",

"submissionUid": "3RBHHC1YPZCDCA95FXS62EEJ10",

"longId": "",

"typeName": "Invoice",

"typeVersionName": "Version 1",

"issuerTin": "C58794843040",

"issuerName": "Name of Supplier",

"receiverId": "C21540299050",

"receiverName": "ABC company",

"dateTimeReceived": 1733491386000,

"dateTimeValidated": 1733491386000,

"totalExcludingTax": 1000,

"totalDiscount": 0,

"totalNetAmount": 0,

"totalPayableAmount": 1060,

"status": "Invalid",

"createdByUserId": "C58794843040:01c8ede8-5782-44c8-87ee-d547639631ad",

"documentStatusReason": null,

"cancelDateTime": null,

"rejectRequestDateTime": null,

"validationResults": {

"status": "Invalid",

"validationSteps": [

{

"status": "Valid",

"error": null,

"name": "Step03-Duplicated Submission Validator"

},

{

"status": "Invalid",

"error": {

"propertyName": null,

"propertyPath": null,

"errorCode": "Error04",

"error": "Step04-Invalid Code Field Validator",

"errorMs": "Step04-Pengesah Medan Kod Tidak Sah",

"innerError": [

{

"propertyName": "cbc:IndustryClassificationCode",

"propertyPath": "/ubl:Invoice/cac:AccountingSupplierParty/cac:Party/cbc:IndustryClassificationCode",

"errorCode": "CV302",

"error": "ItemCode 1111 does not exist in CodeType MSIC Codes",

"errorMs": "Kod Item 1111 tidak wujud dalam Jenis Kod MSIC Codes",

"innerError": null

}

]

},

"name": "Step04-Code Field Validator"

},

{

"status": "Valid",

"error": null,

"name": "Step05-Taxpayer Profile Validator"

},

{

"status": "Valid",

"error": null,

"name": "Step06-Document References Validator"

},

{

"status": "Valid",

"error": null,

"name": "Step07-Document Currency Validator"

}

]

},

"internalId": "Invoice- 01",

"dateTimeIssued": 1733279400000

}

Server Error Response (HTTP 500 Internal Server Error)

{
"status": "error",
"message": "Internal server error. Please try again later."
}

Response Fields:

  • status: Indicates the status of the API call (e.g., "success", "error").
  • message: A human-readable message providing further information about the result.

Responses

Status CodeDescription
200 OKInvoice data validated successfully.
400 Bad RequestInvalid or malformed request.
500 Internal Server ErrorAn error occurred on the server.